package com.whale.mapper;

import com.whale.entity.OrderDetail;
import com.whale.entity.ReserveDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ReserveDetailMapper {
    /**
     * 向预约明细表中插入多条数据
     * @param reserveDetailList
     */
    void insertBetch(List<ReserveDetail> reserveDetailList);
    /**
     * 根据预约id查询订预约明细
     * @param reserveId
     * @return
     */
    @Select("select * from reserve_detail where reserve_id = #{reserveId}")
    List<ReserveDetail> getByReserveId(Long reserveId);

    /**
     * 查询所有预约详细
     * @return
     */
    @Select("select * from reserve_detail")
    List<ReserveDetail> getAllReserveDetail();
}
